home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / notebook / ctlmsg < prev    next >
Text File  |  1989-06-27  |  2KB  |  106 lines

  1. .TL
  2. Control Message Implementation in C News
  3. .AU
  4. Geoff Collyer
  5. .AI
  6. Department of Statistics
  7. University of Toronto
  8. .SH
  9. Introduction
  10. .PP
  11. Netnews
  12. .I "control messages"
  13. are ordinary-looking netnews articles which contain the
  14. special header
  15. .B "Control:" .
  16. Such articles are filed in the pseudo-newsgroup
  17. .I control
  18. and cause related actions by the local news system,
  19. such as mailing a file to the poster of the control message.
  20. .SH
  21. Built-ins
  22. .PP
  23. .B ihave ,
  24. .B sendme ,
  25. and
  26. .B cancel
  27. are handled internally by
  28. .I relaynews ,
  29. because processes cannot share open
  30. .I dbm (3)
  31. databases,
  32. there is no standard way to close them,
  33. and
  34. these control messages read or write the
  35. .I history
  36. files,
  37. including the
  38. .I dbm
  39. files.
  40. .I Ihave
  41. and
  42. .I sendme
  43. are also permitted to have message-id arguments containing
  44. .B <
  45. and
  46. .B > ,
  47. both of which are rejected by
  48. .I relaynews
  49. in arguments to externally-implemented control messages,
  50. since they are shell metacharacters
  51. (\c
  52. .B /
  53. and
  54. .B ..
  55. are also bounced)
  56. and could be indicative of an attempt to
  57. do something nasty.
  58. .SH
  59. Normal Control Messages
  60. .PP
  61. Most control messages are implemented by
  62. .I relaynews
  63. by executing the command following
  64. .B Control: ,
  65. with a search path of
  66. .I $NEWSCTL/bin:$NEWSBIN/ctl
  67. and with standard input set to
  68. the control message article.
  69. The command inherits
  70. .I relaynews 's
  71. user and group ids,
  72. typically
  73. .I news ;
  74. this can be important
  75. to gain access rights to control files.
  76. The news system will be locked
  77. (by
  78. .I $NEWSCTL /lock)
  79. while the command runs,
  80. because
  81. this is often important
  82. for manipulating control files
  83. from the command,
  84. and
  85. because
  86. the news system is locked
  87. while
  88. .I relaynews
  89. runs.
  90. If that command returns non-zero exit status,
  91. mail is sent to
  92. .I $NEWSMASTER
  93. (usually
  94. .B usenet ).
  95. Standard output and standard error
  96. often are redirected to
  97. .I $NEWSCTL /log
  98. and
  99. .I $NEWSCTL /errlog
  100. respectively;
  101. invocations of
  102. .I relaynews
  103. by
  104. .I inews
  105. are exceptions.
  106.